﻿<%@ Page Title="" Language="C#" MasterPageFile="~/DCTEDU_/HeThongMaster.master" AutoEventWireup="true"
    CodeBehind="QLSuaChua.aspx.cs" Inherits="QuanLyThietBi.DCTEDU_.QuanTri.QLSuaChua" %>
 <%@ Register Assembly="PagerControl" Namespace="CutePager" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>Quản lý Sửa chữa - Bảo trì</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:HiddenField runat="server" ID="H_PhongHocId" Value="0" />
    <div class="row">
        <div class="alert alert-danger clearfix">
                <span class="alert-icon"><i class="fa fa-envelope-o"></i></span>
                <div class="notification-info">
                    <ul class="clearfix notification-meta">
  
                    </ul>
                    <p>
                        <asp:Image runat="server" ID="img1" ImageUrl="~/Images/checkk.png"/> Icon này thể hiện tình trạng thiết bị ổn định; <asp:Image runat="server" ID="Image1" ImageUrl="~/Images/redx.png"/> Icon này thể hiện tình trạng thiết bị có vấn đề;<br/>
                        1. Chọn phòng máy muốn xem báo cáo;<br/>
                        2. Chọn thiết bị cần cập nhật thông tin sau khi đối chiếu thực tế;<br/>
                        3. Có thể kéo thả các thiết bị trong phòng, sử dụng để hoán đổi vị trí các máy tính trong phòng.
                    </p>
                </div>
            </div> 
        <div class="col-lg-3">
            <div class="border-head">
                <h3>
                    Danh sách phòng máy tính<font color="red"><b><asp:Literal runat="server" ID="litPhong"></asp:Literal></b></font></h3>
            </div>
            <section class="panel">  

            <div class="panel-body">
                 
                 <table class="table table-striped">
                                <thead>
                                <tr>
                                    <th>#</th>
                                    <th>Tên phòng</th>
                                    <th>Cán bộ quản lý</th>
                                </tr>
                                </thead>
                                <tbody>
                                <asp:Repeater runat="server" ID="rpPhongHoc" OnItemCommand="rpPhongHoc_ItemCommand"><ItemTemplate>  
                                
                                <tr>
                                    <td><%# Container.ItemIndex + 1%></td>
                                    <td><asp:LinkButton runat="server" ID="cmdSelect" CommandName="Select" CommandArgument='<%# Eval("MaPhong") %>' ><%# Eval("TenPhong") %></asp:LinkButton></td>
                                    <td><%# getTenCanBo(Eval("MaCanBo")) %></td>
                                </tr>      
                                
                                </ItemTemplate></asp:Repeater> 
                                </tbody>
                            </table> 
            </div> 
            </section>
            <div class="row" style="display: none;">
                <div class="col-lg-2">
                    <asp:TextBox runat="server" ID="txtday1" CssClass="col-lg-12 form-control"></asp:TextBox> 
 <asp:Literal runat="server" ID="litday1"></asp:Literal>
                </div>
                <div class="col-lg-2">
                    <asp:TextBox runat="server" ID="txtday2" CssClass="col-lg-12 form-control"></asp:TextBox>    
                     <asp:Literal runat="server" ID="litday2"></asp:Literal>
                </div>  
                <div class="col-lg-2">
                    <asp:TextBox runat="server" ID="txtday3" CssClass="col-lg-12 form-control"></asp:TextBox>   
                     <asp:Literal runat="server" ID="litday3"></asp:Literal>
                </div>
                <div class="col-lg-2">
                    <asp:TextBox runat="server" ID="txtday4" CssClass="col-lg-12 form-control"></asp:TextBox>  
                     <asp:Literal runat="server" ID="litday4"></asp:Literal>
                </div>
            </div>
        </div>   
        <div class="col-lg-9">
            <section class="panel">
                        <header class="panel-heading">
                           Danh sách Báo cáo Thiết bị
                              <span class="tools pull-right">
                                <a class="fa fa-chevron-down" href="javascript:;"></a>
                            </span>
                        </header>
                        <div class="panel-body">
                       <table class="table table-striped">
                                <thead>
                                <tr>
                                    <th>Sửa</th>
                                    <th>Tên thiết bị</th>
                                    <th>Ghi chú</th>  
                                    <th>Hướng giải quyết</th>   
                                    <th>Loại tình trạng</th>
                                    <%= H_PhongHocId.Value == "0" ? "<th>Phòng học</th>" : ""%>
                                    <th>Ngày báo cáo</th>  
                                    <th>Ngày sửa chữa</th>
                                    <th>Tình trạng</th>
                                    <th>Cán bộ báo cáo</th>
                                </tr>
                                </thead>
                                <tbody>
                                <asp:Repeater runat="server" ID="rpHoatDong" OnItemCommand="rpHoatDong_OnItemCommand"><ItemTemplate>
                                  <tr>
                                      <td><asp:ImageButton runat="server" ID="cmdEdit" ImageUrl="~/Images/edit.png" CommandName="Edit" CommandArgument='<%# Eval("MaHoatDongSuaChua") %>'/></td>
                                      <td><%# getTenThietBi(Eval("MaThietBi")) %></td> 
                                      <td><%# Eval("GhiChu") %></td> 
                                      <td><%# getHuongGiaiQuyen(Eval("MaHoatDongSuaChua")) %></td> 
                                      <td><%# getLoaiTinhTrang(Eval("MaLoaiTinhTrang"))%></td>
                                       <%# H_PhongHocId.Value == "0" ? "<td>"+ getTenPhong(Eval("MaThietBi")) +"</td>" : ""%> 
                                      <td><%# Convert.ToDateTime(Eval("NgayCapNhat")).ToString("dd/MM/yyyy") %></td>  
                                      <td><%# getNgaySuaChua(Eval("MaHoatDongSuaChua"))%></td>
                                      <td><%# getTinhTrang(Eval("MaThietBi"))%></td>
                                      <td><%# getTenCanBo(Eval("MaCanBo"))%></td>
                                  </tr>
                                </ItemTemplate></asp:Repeater> 
                                 <cc1:Pager ID="Pager1" runat="server" PreviousClause="Lùi" NextClause="Tiến" LastClause=""
                                    FirstClause="" PageClause="Trang " OfClause=" /" PageSize="5" OnCommand="Pager1_Command"
                                    ForeColor="#006600" Font-Bold="True" />
                                </tbody>
                        </table>     
                       </div>
             </section>
        </div>     
    </div>
    <div class="row">
        <asp:Button ID="cmdLuu" runat="server" 
                 Style="float: right; position: fixed; bottom: 5px;margin-left: 5px;z-index: 999;"
                OnClick="cmdSave_OnClick" Text="Lưu lại vị trí sắp xếp" Visible="False" CausesValidation="False" CssClass="btn btn-danger btn-image-save" /> 
        <div class="col-lg-2">
            <section class="panel">
                        <header class="panel-heading">
                            Dãy 1
                             <span class="tools pull-right">
                                <a class="fa fa-chevron-down" href="javascript:;"></a>
                            </span>
                        </header>
                        <div class="panel-body">
                            <div class="dd" id="nestable_list_1">
                                <ol class="dd-list">     
                                <asp:Repeater runat="server" ID="rpDay1"><ItemTemplate>
                                    <li class="dd-item" data-id='<%# Eval("MaThietBi") %>'>
                                        <div class="dd-handle"><%# Eval("TenThietBi") %> <span class="tools pull-right"><%# (Eval("TrangThai").ToString())=="True" ? "<html><img src=../../Images/checkk.png /></html>" : "<html><img src=../../Images/redx.png /></html>"%></span></div>
                                    </li>   
                                    </ItemTemplate></asp:Repeater>
                                </ol>
                            </div>
                        </div>
                    </section>
        </div>
        <div class="col-lg-2">
            <section class="panel">
                        <header class="panel-heading">
                            Dãy 2
                              <span class="tools pull-right">
                                <a class="fa fa-chevron-down" href="javascript:;"></a>
                            </span>
                        </header>
                        <div class="panel-body">
                            <div class="dd" id="nestable_list_2">
                                <ol class="dd-list">
                                   <asp:Repeater runat="server" ID="rpDay2"><ItemTemplate>
                                    <li class="dd-item" data-id='<%# Eval("MaThietBi") %>'>
                                        <div class="dd-handle"><%# Eval("TenThietBi") %> <span class="tools pull-right"><%# (Eval("TrangThai").ToString())=="True" ? "<html><img src=../../Images/checkk.png /></html>" : "<html><img src=../../Images/redx.png /></html>"%></span></div>
                                    </li>   
                                    </ItemTemplate></asp:Repeater>
                                </ol>
                            </div>
                        </div>
                    </section>
        </div>  
        <div class="col-lg-2">
            <section class="panel">
                        <header class="panel-heading">
                            Dãy 3
                              <span class="tools pull-right">
                                <a class="fa fa-chevron-down" href="javascript:;"></a>
                            </span>
                        </header>
                        <div class="panel-body">
                            <div class="dd" id="nestable_list_3">
                                <ol class="dd-list">
                                   <asp:Repeater runat="server" ID="rpDay3"><ItemTemplate>
                                    <li class="dd-item" data-id='<%# Eval("MaThietBi") %>'>
                                        <div class="dd-handle"><%# Eval("TenThietBi") %> <span class="tools pull-right"><%# (Eval("TrangThai").ToString())=="True" ? "<html><img src=../../Images/checkk.png /></html>" : "<html><img src=../../Images/redx.png /></html>"%></span></div>
                                    </li>   
                                    </ItemTemplate></asp:Repeater>
                                </ol>
                            </div>
                        </div>
                    </section>
        </div>
        <div class="col-lg-2">
            <section class="panel">
                        <header class="panel-heading">
                            Dãy 4
                              <span class="tools pull-right">
                                <a class="fa fa-chevron-down" href="javascript:;"></a>
                            </span>
                        </header>
                        <div class="panel-body">
                            <div class="dd" id="nestable_list_4">
                                <ol class="dd-list">
                                   <asp:Repeater runat="server" ID="rpDay4"><ItemTemplate>
                                    <li class="dd-item" data-id='<%# Eval("MaThietBi") %>'>
                                        <div class="dd-handle"><%# Eval("TenThietBi") %> <span class="tools pull-right"><%# (Eval("TrangThai").ToString())=="True" ? "<html><img src=../../Images/checkk.png /></html>" : "<html><img src=../../Images/redx.png /></html>"%></span></div>
                                    </li>   
                                    </ItemTemplate></asp:Repeater>
                                </ol>
                            </div>
                        </div>
                    </section>
        </div>  
         <div class="col-lg-4">
            <section class="panel">
                        <header class="panel-heading">
                           Báo cáo tình trạng thiết bị hiện tại
                              <span class="tools pull-right">
                                <a class="fa fa-chevron-down" href="javascript:;"></a>
                            </span>
                        </header>
                        <div class="panel-body">
                            <asp:HiddenField runat="server" ID="H_MaThietBi" Value="0"/> 
                            <asp:HiddenField runat="server" ID="H_HoatDongSuaChua" Value="0"/>
                            <div class="row">     
                             <div class="form-group">
                               <asp:Literal runat="server" ID="litCanBo"></asp:Literal>
                               </div>  
                               </div>
                               <div class="row"> 
                          <div class="form-group">
                               <label class="col-sm-6 control-label"><asp:Literal runat="server" ID="litTenThietBi"></asp:Literal></label>
                               </div>  
                               </div>
                        <div class="row"> &nbsp;
                         </div>         
                        <div class="row"> 
                    <div class="form-group">
                        <label class="col-sm-6 control-label">Loại tình trạng:</label>
                        <div class="col-sm-6">
                        <asp:DropDownList ID="cboLoaiTinhTrang" runat="server" CssClass="form-control canh-float-left error" ></asp:DropDownList>
                        </div>
                    </div>    
                    </div> 
                    <div class="row"> &nbsp;
                         </div>         
                        <div class="row"> 
                    <div class="form-group">
                        <label class="col-sm-6 control-label">Cán bộ báo cáo:</label>
                        <div class="col-sm-6">
                        <asp:DropDownList ID="cboCanBo" runat="server" CssClass="form-control canh-float-left error" ></asp:DropDownList>
                        </div>
                    </div>    
                    </div>  
                    <div class="row"> &nbsp;
                         </div>         
                        <div class="row"> 
                    <div class="form-group">
                        <label class="col-sm-6 control-label">Cán bộ quản lý duyệt:</label>
                        <div class="col-sm-6">
                        <asp:DropDownList ID="cboCanBoQuanLy" runat="server" CssClass="form-control canh-float-left error" ></asp:DropDownList>
                        </div>
                    </div>    
                    </div>    
                    <div class="row"> &nbsp;
                         </div>         
                        <div class="row"> 
                    <div class="form-group">
                        <label class="col-sm-6 control-label">Trạng thái:</label>
                        <div class="col-sm-6">
                        <asp:CheckBox ID="chkTrangThai" runat="server" Checked="False" CssClass="canh-float-left error" ></asp:CheckBox>
                        </div>
                    </div>    
                    </div>
                     <div class="row"> &nbsp;
                         </div> 
                     <div class="row"> 
                    <div class="form-group">    
                     <label class="col-sm-6 control-label">Ghi chú:</label>
                        <div class="col-sm-6">
                        <asp:TextBox ID="txtGhiChu" runat="server" TextMode="MultiLine" Rows="3" CssClass="form-control canh-float-left error" ></asp:TextBox>
                        </div>
                     </div>
                    </div>  
                     <div class="row"> &nbsp;
                         </div> 
                     <div class="row"> 
                    <div class="form-group">    
                     <label class="col-sm-6 control-label">Hướng giải quyết:</label>
                        <div class="col-sm-6">
                        <asp:TextBox ID="txtHuongGiaiQuyet" runat="server" TextMode="MultiLine" Rows="3" CssClass="form-control canh-float-left error" ></asp:TextBox>
                        </div>
                     </div>
                    </div>
                    <div class="row"> &nbsp;
                         </div> 
                           <div class="row">
                                <div class="alert alert-warning clearfix">
                <span class="alert-icon"><i class="fa fa-envelope-o"></i></span>
                <div class="notification-info">
                    <ul class="clearfix notification-meta">
  
                    </ul>
                    <p>
                        Quản trị kiểm tra tình trạng thực tế của thiết bị và cập nhật lại hệ thống.  
                        Tự động Hệ thống báo lại người dùng đã cập nhật thông tin.
                    </p>
                </div>
            </div> 
                    <div class="form-group">  
                    <asp:HiddenField runat="server" ID="H_NgayCapNhat" Value=""/>
                         <asp:Button ID="cmdReport" Visible="False" runat="server" 
                 Style="float: right; position: relative; bottom: 5px;margin-left: 5px;"
                OnClick="cmdReport_OnClick" Text="Cập nhật" CausesValidation="False" CssClass="btn btn-primary btn-image-report" />  
                   </div>
                           </div>
                        </div>
             </section>   
        </div>
    </div> 
     <div class="row">    
    <div class="col-lg-8">
       <section class="panel panel-primary"><header class="panel-heading"> <center>BẢNG GIÁO VIÊN</center>  <span class="tools pull-right"><= LỐI VÀO</span> </header>  </section>
        </div>
    </div>
</asp:Content>
